package com.xncoding.quartz.config;


import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @author snluomeng
 * @date 2019/12/19 16:27
 */
public class MyJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("==================开始执行任务==================");
        System.out.println("执行任务线程ID{}"+Thread.currentThread().getId());
        JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap();
        System.out.println("参数为{}"+jobDataMap.get("testKey"));
    }
}
